package com.sun.controller;


import com.sun.bean.Customer;
import com.sun.common.RestResponse;
import com.sun.service.CustomerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/customer")
public class CustomerController {

    @Resource
    private CustomerService customerService;

  @PostMapping("/list")
    public RestResponse<List<Customer>> queryList(){
       return RestResponse.ok(customerService.selectAllDataList());
    }
}
